package com.eh.adapter.duckSimulator;

import com.eh.adapter.duckSimulator.Kind.Duck;
import com.eh.adapter.duckSimulator.Kind.Turkey;
import com.eh.adapter.duckSimulator.Kind.impl.DuckAdapter;
import com.eh.adapter.duckSimulator.Kind.impl.MallardDuck;
import com.eh.adapter.duckSimulator.Kind.impl.WildTurkey;

import java.util.Stack;

/**
 * Created by David on 2016/4/30.
 */
public class DuckAdapterSimulator {
    public static void main(String[] args) {
        Duck duck = new MallardDuck();
        duck.quack();
        duck.fly();

        Turkey turkey = new WildTurkey();
        Duck duck1 = new DuckAdapter(turkey);
        duck1.quack();
        duck1.fly();
    }
}
